package uz.edo.db.manager;

import uz.edo.db.bean.Privilege;
import uz.edo.db.manager.core.DBManager;
import uz.edo.utils.Constants;

import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: said
 * Date: 1/16/12
 * Time: 11:06 AM
 * To change this template use File | Settings | File Templates.
 */
public class PrivilegeManager extends DBManager{
    private static PrivilegeManager instance = new PrivilegeManager();

    public static PrivilegeManager getInstance() {
        return instance;
    }

    public PrivilegeManager() {
        super(Privilege.class);
    }

    public List<Privilege> getPrivileges() throws Exception {
        return createQuery("from Privilege p where p.name != :name").setParameter("name", Constants.SU).list();
    }
}
